// 导入组件
import Vue from "vue";
import Router from "vue-router";
// 登录
import login from "@/views/login";
// 首页
import index from "@/views/index";
// 用户管理
import User from "@/views/user/User";
// 管理员管理
import Admin from "@/views/system/Admin";

// 商品管理
import Goods from "@/views/goods/Goods";
// 商品分类
import Classify from "@/views/goods/Classify";
// 交易订单
import Order from "@/views/pay/Order";

// 财务明细
import Finance from "@/views/finance/Finance";

import FinanceStation from "@/views/finance/FinanceStation";

// 提现管理
import Withdraw from "@/views/finance/Withdraw";
// 押金管理
import Deposit from "@/views/finance/Deposit";

// 资讯表管理
import InformationTable from "@/views/information/InformationTable";
// 资讯类别表管理
import InformationCategory from "@/views/information/InformationCategory";

// 轮播图管理
import Carousel from "@/views/terrace/Carousel";

// 首页顶部跳转管理
import IndexJump from "@/views/terrace/IndexJump";
// 选课中心跳转管理
import ActivityJump from "@/views/terrace/ActivityJump";
// 择校服务跳转管理
import SchoolJump from "@/views/terrace/SchoolJump";
// 课程体系跳转管理
import CourseJump from "@/views/terrace/CourseJump";

// 台账管理
import Ledger from "@/views/ledger/Ledger";
//即开分类
import ledgerClassify from "@/views/ledger/classify";
//即开收入列表
import ImmediateRevenue from "@/views/ledger/ImmediateRevenue";

//=======================
import teacherClassify from "@/views/teacher/teacherClassify";

import teacherList from "@/views/teacher/teacherList";

import columnPageClassify from "@/views/columnPage/columnPageClassify";

import columnPageDetail from "@/views/columnPage/columnPageDetail";

import schoolList from "@/views/school/schoolList";

import schoolType from "@/views/school/schoolType";

import gradeClassification from "@/views/school/gradeClassification";

import shcoolSite from "@/views/school/shcoolSite";

import schoolDetail from "@/views/school/schoolDetail";

import courseIndexList from "@/views/course/courseIndexList";

import courseIndexTwoList from "@/views/course/courseIndexTwoList";

import courseList from "@/views/course/courseList";

import courseDetail from "@/views/course/courseDetail";

import columnPageRichText from "@/views/columnPage/richText";

import terraceBasic from "@/views/terrace/basic";

import encyclopedia from "@/views/terrace/encyclopedia";

import blogroll from "@/views/terrace/blogroll";

import commonProblem from "@/views/terrace/commonProblem";
import terraceCarleton from "@/views/terrace/carleton";

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
  routes: [
    {
      path: "/",
      name: "",
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/login",
      name: "登录",
      component: login,
      hidden: true,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/index",
      name: "首页",
      component: index,
      iconCls: "el-icon-tickets",
      children: [
        {
          path: "/terrace/terraceBasic",
          name: "基本信息配置",
          component: terraceBasic,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/commonProblem",
          name: "基本信息配置",
          component: commonProblem,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/terraceCarleton",
          name: "卡尔顿信息",
          component: terraceCarleton,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/encyclopedia",
          name: "考试百科",
          component: encyclopedia,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/blogroll",
          name: "友情链接",
          component: blogroll,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/User/User",
          name: "用户管理",
          component: User,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/goods/Goods",
          name: "商品管理",
          component: Goods,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/goods/Classify",
          name: "商品分类",
          component: Classify,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/pay/Order",
          name: "交易订单",
          component: Order,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/finance/Finance",
          name: "财务明细",
          component: Finance,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/finance/FinanceStation",
          name: "站点财务明细",
          component: FinanceStation,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/finance/Withdraw",
          name: "提现管理",
          component: Withdraw,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/finance/Deposit",
          name: "押金管理",
          component: Deposit,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/information/InformationTable",
          name: "押金管理",
          component: InformationTable,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/information/InformationCategory",
          name: "押金管理",
          component: InformationCategory,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/Carousel",
          name: "轮播图管理",
          component: Carousel,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/IndexJump",
          name: "首页顶部跳转管理",
          component: IndexJump,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/ActivityJump",
          name: "选课中心跳转管理",
          component: ActivityJump,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/SchoolJump",
          name: "择校服务跳转管理",
          component: SchoolJump,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/terrace/CourseJump",
          name: "课程体系跳转管理",
          component: CourseJump,
          meta: {
            requireAuth: true
          }
        },

        {
          path: "/system/Admin",
          name: "管理员管理",
          component: Admin,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/ledger/Ledger",
          name: "台账管理",
          component: Ledger,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/ledger/classify",
          name: "即开分类",
          component: ledgerClassify,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/ledger/ImmediateRevenue",
          name: "即开收入",
          component: ImmediateRevenue,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/teacher/teacherClassify",
          name: "教师分类",
          component: teacherClassify,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/teacher/teacherList",
          name: "教师列表",
          component: teacherList,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/columnPage/columnPageClassify",
          name: "栏目页分类",
          component: columnPageClassify,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/columnPage/columnPageDetail",
          name: "栏目页内容页面",
          component: columnPageDetail,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/columnPage/columnPageRichText",
          name: "栏目页专题页",
          component: columnPageRichText,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/school/schoolList",
          name: "学校列表",
          component: schoolList,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/school/schoolDetail",
          name: "学校列表",
          component: schoolDetail,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/school/schoolType",
          name: "学校类型",
          component: schoolType,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/school/gradeClassification",
          name: "年级分类",
          component: gradeClassification,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/school/shcoolSite",
          name: "年级分类",
          component: shcoolSite,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/course/courseIndexList",
          name: "课程首页列表",
          component: courseIndexList,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/course/courseIndexTwoList",
          name: "课程首页列表",
          component: courseIndexTwoList,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/course/courseList",
          name: "课程首页列表",
          component: courseList,
          meta: {
            requireAuth: true
          }
        },
        {
          path: "/course/courseDetail",
          name: "课程详情",
          component: courseDetail,
          meta: {
            requireAuth: true
          }
        }
      ]
    }
  ]
});
